<template>
	<div>
		<div class="box">
			<div class="top">
				<div class="top_left">
					<span style="font-family: 'KaiTi';font-size: 16px;">Prompt</span>
				</div>
				<div class="top_right" @click="ShowAIWords">
					<svg t="1683716393871" class="icon" viewBox="0 0 1024 1024" version="1.1"
						xmlns="http://www.w3.org/2000/svg" p-id="5245" width="200" height="200">
						<path
							d="M557.311759 513.248864l265.280473-263.904314c12.54369-12.480043 12.607338-32.704421 0.127295-45.248112-12.512727-12.576374-32.704421-12.607338-45.248112-0.127295L512.127295 467.904421 249.088241 204.063755c-12.447359-12.480043-32.704421-12.54369-45.248112-0.063647-12.512727 12.480043-12.54369 32.735385-0.063647 45.280796l262.975407 263.775299-265.151458 263.744335c-12.54369 12.480043-12.607338 32.704421-0.127295 45.248112 6.239161 6.271845 14.463432 9.440452 22.687703 9.440452 8.160624 0 16.319527-3.103239 22.560409-9.311437l265.216826-263.807983 265.440452 266.240344c6.239161 6.271845 14.432469 9.407768 22.65674 9.407768 8.191587 0 16.352211-3.135923 22.591372-9.34412 12.512727-12.480043 12.54369-32.704421 0.063647-45.248112L557.311759 513.248864z"
							fill="#707070" p-id="5246"></path>
					</svg>
				</div>
			</div>
			<div class="content">
				<div v-for="item in this.$myWords.cn">
					<div class="tit">
						<h5 class="tit_one" style="font-size: 15px;margin: 0;margin-top: 12px;margin-bottom: 12px">
							{{ item[0] }}</h5>
						<div class="tit_two" style="font-size: 14px;">{{ item[1] }}</div>
						<div class="copy-btn" @click="Copy(item[0] + ',' + item[1])">复制</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</template>

<script>
export default {
	data() {
		return {
			jsonData: null
		}
	},
	mounted() {
	},
	methods: {
		ShowAIWords() {
			this.$emit('child-showAI', 111);
		},
		Copy(tit) {
			//提示

			this.$emit('child-Tips', 111);


			const data = tit.trim();
			//const data = 'Hello, world!'
			this.$copyText(data).then(function () {
				console.log('Copied:', data)
			}, function () {
				console.error('Copy failed:', data)
			})
		}
	}
}
</script>

<style scoped>
.box {
	background-color: #e6e5e5;
	border: 1px solid #636363;
	display: flex;
	height: 500px;
	flex-direction: column;
	z-index: 9999999;
	padding: 10px;
	border-radius: 6px;
	box-shadow: 0 0 10px 1px #888888;
	font-family: 'KaiTi';
}



.top {
	display: flex;
	justify-content: space-between;
	font-size: 15px;
	font-weight: 600;

}

.top_right:hover {
	cursor: pointer;
}

.top_right svg {
	width: 22px;
	height: 22px;
	font-weight: 700;
	margin-right: 2px;
}

.content {
	overflow: auto;
	display: flex;
	flex-direction: column;
	align-items: center;

}

.content::-webkit-scrollbar {
	/*滚动条整体样式*/
	width: 3px;
	/*滚动条整体宽度*/
	/*height: 1100px;*/
	/*scrollbar-arrow-color:red;*/
}

.content::-webkit-scrollbar-thumb {
	/*滚动条里面的小方块*/
	border-radius: 10px;
	/*-webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);*/
	background-color: #c3c4c6;
	/*滚动条颜色*/
}

.content::-webkit-scrollbar-track {
	/*滚动条里面轨道*/
	/*-webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);*/
	/*border-radius: 5px;*/
	/*滚动条背景颜色*/
}

/* 火狐 */
/* Firefox 64及以上版本 */
.content {
	scrollbar-width: none;
}

.tit {
	width: 85%;
	margin: 0 auto;
	border-radius: 8px;
	background-color: #c3c4c6;
	text-align: center;
	margin-top: 10px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	font-size: 13px;
	font-family: monospace;
	padding-left: 10px;
	padding-bottom: 10px;
	position: relative;
	font-family: 'KaiTi';
}

.copy-btn {
	cursor: pointer;
	font-size: 13px;
	position: absolute;
	top: 5px;
	right: 5px;
	/* 		border: 1px solid #676767;
		border-radius: 5px; */
	color: #676767;
	font-family: monospace;
	font-family: 'KaiTi';
}

.tit_two {
	text-align: left;
}
</style>